package leetcode.code1909;

import leetcode.IDebug;

public class Solution implements IDebug {

	public boolean canBeIncreasing(int[] nums) {
		boolean delete = false;
		int lasti = 0;
		for (int i = 1; i < nums.length; i++) {
			int cur = nums[i];
			if (cur <= nums[lasti]) {
				if (delete) {
					return false;
				} else {
					delete = true;
					if (lasti == 0 || cur > nums[lasti - 1]) {
						if (cur < nums[lasti]) {
							lasti = i;
						}
					}
				}
			} else {
				lasti = i;
			}
		}
		return true;
	}

	@Override
	public void debug1() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug2() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
